using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace Data
{
    /// <summary>
    /// Controller class for Orders
    /// </summary>
    public partial class productdetailController
    {


		
	    /// <summary>
	    /// Inserts a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Insert, true)]
	    public void Insert(
                                        String 
                            ProID
                            , 
                            String 
                            Name
                            , 
                            String 
                            CateDetailID
                            , 
                            String 
                            ProParentID
                            , 
                            String 
                            Description
                            , 
                            Int32 
                            VipLevel
                            , 
                            String 
                            Price
                            , 
                            Double 
                            Quantity
                            , 
                            Double 
                            QuantitySole
                            , 
                            DateTime 
                            CreatedDate
                            , 
                            DateTime 
                            UpdatedDate
            )
	    {		
			productdetail item = new productdetail();
			
			item.ProID = ProID;
			item.Name = Name;
			item.CateDetailID = CateDetailID;
			item.ProParentID = ProParentID;
			item.Description = Description;
			item.VipLevel = VipLevel;
			item.Price = Price;
			item.Quantity = Quantity;
			item.QuantitySole = QuantitySole;
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
		    item.Save("");
	    }

	    /// <summary>
	    /// Updates a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Update, true)]
	    public void Update( String  ProID,  String  Name,  String  CateDetailID,  String  ProParentID,  String  Description,  Int32  VipLevel,  String  Price,  Double  Quantity,  Double  QuantitySole,  DateTime  CreatedDate,  DateTime  UpdatedDate)
		{
			productdetail item = new productdetail();
			
			item.ProID = ProID;
			item.Name = Name;
			item.CateDetailID = CateDetailID;
			item.ProParentID = ProParentID;
			item.Description = Description;
			item.VipLevel = VipLevel;
			item.Price = Price;
			item.Quantity = Quantity;
			item.QuantitySole = QuantitySole;
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
		    item.MarkOld();
		    item.Save("");		
	    }
    }

}
